$(shell echo SRC_ROOT_DIR = `pwd` > Variables.inc)
$(shell echo SVNDEF = -D\'SVN_REV=\"Undef\"\' >> Variables.inc)
$(shell echo VERSION = \"`cat Version.txt`\" >> Variables.inc)

$(shell sleep 0.1)

include Variables.inc
include Makefile.inc

SOURCES = test_options_system.cpp

APP_SOURCES = 

SUBDIRS = utils 

OBJECTS= utils/*.o 

TEST_EXECUTABLES = testQCP test_reconstruct test testSid test_options_system test_movers
EXECUTABLES = test_options_system

#DEPS    = $(OBJECTS:%.o=%.d)

all: clean_all compile2 compile link_all 

compile: $(SOURCES)
	$(CC) $(CC_FLAGS) $(SOURCES)

compile2: 
	for i in $(SUBDIRS); do \
		(cd $$i; $(MAKE)); \
	done;
#	$(CC) $(CC_FLAGS) $(SOURCES)


#TEST_EXECUTABLES: ###################################

test_options_system:
	$(CC) $(LINK_FLAGS) -o test_options_system test_options_system.o $(OBJECTS) $(EXT_LIBS)

	


#EXECUTABLES: ########################################

link_all: $(EXECUTABLES)

	
clean_executables:
	rm -f $(EXECUTABLES)	



clean_all: clean_executables clean_all_objects

clean_all_objects:
	find . -name "*.o" -exec rm -rf {} \; -print 

strip:
	strip $(EXECUTABLES)

move_to_bin:
	mv $(EXECUTABLES) ../bin/

#precompiler dependencies
#include $(DEPS)
